package cn.iocoder.springboot.lab03.kafkademo.controller;

import cn.iocoder.springboot.lab03.kafkademo.producer.Demo02Producer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.concurrent.ExecutionException;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2022/1/15 14:14
 */
@Controller
public class MavenTest {

    @Resource
    private Demo02Producer demo02Producer;

    @GetMapping(value = "/test")
    @ResponseBody
    public String getMessage() throws ExecutionException, InterruptedException {
        demo02Producer.asyncSend();
        return "Project YES";
    }
}
